package com.fcgzs.sellergoods.feign;

import com.fcgzs.entity.PageResult;
import com.fcgzs.entity.Result;
import com.fcgzs.sellergoods.pojo.Item;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/****
 * @Author:ujiuye
 * @Description:
 * @Date 2021/2/1 14:19
 *****/
@FeignClient(value = "SELLERGOODS")
public interface ItemFeign {

    @GetMapping("/item/findByStatus/{status}")
    public Result<List<Item>>  findByStatus(@PathVariable(name="status") String status);


    @GetMapping("/item/{id}")
    public Result<Item> findById(@PathVariable Long id);

    @PutMapping("/item/decrCount/{username}")
    public Result decrCount(@PathVariable(name = "username") String username);

}